package com.zodiac.app.szse.sse;

import com.alibaba.fastjson.JSON;
import com.google.common.base.Joiner;
import lombok.Data;
import org.apache.commons.lang3.RandomStringUtils;

/**
 * 上交所接口公共请求参数
 */
@Data
public class SseCommonRequest {
    private String jsonCallBack = "jsonCallBack" + RandomStringUtils.randomNumeric(5);

    protected String toQueryString() {
        return Joiner.on("&").withKeyValueSeparator("=").join(JSON.parseObject(JSON.toJSONString(this))) + "&_=" + System.currentTimeMillis();
    }
}
